TARGET = qtquickcontrols2silicastyleplugin
TARGETPATH = QtQuick/Controls.2/Silica
IMPORT_VERSION = 1.0

QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private

DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII

CONFIG += link_pkgconfig

isEmpty(USE_MLITE) {
    sailfish {
        USE_MLITE = "true"
    } else {
        USE_MLITE = "false"
    }
}

equals(USE_MLITE, "true") {
    PKGCONFIG += mlite5
    DEFINES += USE_MLITE
}

include(silica.pri)

OTHER_FILES += \
    qmldir \
    $$QML_FILES

SOURCES += \
    $$PWD/qtquickcontrols2silicastyleplugin.cpp

#load(qml_plugin)


TEMPLATE = lib
CONFIG += plugin

CONFIG += relative_qt_rpath  # Qt's QML plugins should be relocatable

target.path = $$[QT_INSTALL_QML]/QtQuick/Controls.2/Silica
INSTALLS += target

qmlIndexFiles.files += qmldir $$QML_FILES
qmlIndexFiles.path += $$target.path
INSTALLS += qmlIndexFiles
